home *** CD-ROM | disk | FTP | other *** search
- Path: news.belwue.de!uzwil!kuehl
- From: kuehl@uzwil.informatik.uni-konstanz.de (Dietmar Kuehl)
- Newsgroups: comp.lang.c++,gnu.g++.help
- Subject: Re: DONT UNDERSTAND - array of char error
- Followup-To: comp.lang.c++,gnu.g++.help
- Date: 4 Mar 1996 02:31:55 GMT
- Organization: FakultΣt fⁿr Mathematik und Informatik
- Message-ID: <4hdkmr$j1d@news.BelWue.DE>
- References: <4habvu$99j@panix.com> <4hahju$bil@news.BelWue.DE> <4hcbje$h52@panix.com>
- Reply-To: dietmar.kuehl@uni-konstanz.de
- NNTP-Posting-Host: uzwil.informatik.uni-konstanz.de
- X-Newsreader: TIN [version 1.2 PL2]
-
- Hi,
- Arthur Cinader Jr (acinader@panix.com) wrote:
- : Wow, thanks. I love the internet and thank you for your kind
- : assistance!
-
- Well, this type of answer you will get for nearly every (real) C++
- question posted in comp.lang.c++.moderated (not necessarily by myself,
- of course...). It takes somewhat longer (because of the moderation) but
- we (i.e. the moderators of clc++m) hurry to make the delay small. Just
- have a look at this newsgroup! It is intended for all questions of
- (nearly) all levels of experience: only stuff found in the first few
- chapters of a C++ tutorial and stuff answered in the FAQ file is
- rejected. Just some advertising :-)
-
- : >... i.e. 'fieldlength' has to be a 'const'. If 'fieldlength' is
- : >non-const you have to allocate the second dimension by hand (unless you
- : >use an array class like suggested below):
-
- : I thought I covered this by making
-
- : const int fieldlength;
-
- : and using a member intializer like this:
-
- : Param::Param(char *shape)
- : :maxargs(10), fieldlength(20)
-
- No, this is not sufficient (my statement above is indeed misleading):
- Actually, the array dimensions have to be "constant expression", i.e.
- expression, that can be evaluated at compile-time. Just feeding in some
- 'const int' is not sufficient.
-
- : Your point noted, but I am going to risk it in this case. I
- : am overwhelmed enough without having to stop now to figure out
- : how to use the libraries and understand their interface. I do
- : recognize this as a crucial part of my becoming productive and
- : I will endevour to find documentation on the ISO standard
- : library and learn about how to use it. FWIW the next chapter
- : in the text is on I/O streams which I believe spends a
- : considerable amount of time explaining "pre-packaged" class
- : hiararchies and how to navigate them.
-
- I would love if there were a C++ tutorial which introduces C++ hand in
- hand with the ISO Standard C++ Library. Unfortunately, I didn't came
- across such a tutorial yet :-( However, if you have managed to get
- enough insights into C++ to be ready for a library, I suggest you learn
- about STL the Standard Template Library (which is just a name devoted
- to a certain subset of the C++ Library). There is a good tutorial on
- this topic available: "STL Tutorial and Reference Guide", D.Musser &
- A.Saini, Addison-Wesley.
- --
- dietmar.kuehl@uni-konstanz.de
- http://www.informatik.uni-konstanz.de/~kuehl
- I am a realistic optimist - that's why I appear to be slightly pessimistic
-